#define _CRT_SECURE_NO_WARNINGS
#include"Sort.h"


void InsertSort(int* a, int size)
{
	int i = 0;
	for (i = 0; i < size - 1; i++)
	{
		int end = i;
		int tmp = a[i + 1];
		while (end >= 0)
		{
			if (a[end] > tmp)
			{
				a[end + 1] = a[end];
			}
			else
			{
				break;
			}
			end--;
		}
		a[end + 1] = tmp;
	}

}